Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 9, 2026 22:27
set -e, -u, -o, -x pipefail explanation
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active May 9, 2026 22:27
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@tsmx
tsmx / increase-efi-partition-in-dual-boot.md
Created December 4, 2024 21:24
Increasing the EFI partition in a Win 11 / Fedora 40 dual-boot scenario

Increasing the EFI partition in a Win 11 / Fedora 40 dual-boot scenario

A guide on how I did come to a proper working Win 11 / Fedora 40 dual boot setup with a right-sized EFI partition. Hope that helps :)

Windows and Linux dual-boot setup

In most Windows/Linux dual-boot setups it is very likely you had first installed Win 11 (or any other Windows version) on your machine. Typically you'll then shrink down the existing Windows partition from the right end side to create some unpartitioned space for the Linux installation. This could easily be done with Windows built-in harddisk manager tool. Then install Linux in the free space and use GRUB2 as the bootloader.

I previously did this procedure again on a new PC having Win 11 preinstalled. Made up some space as described above and installed Fedora 40 with GRUB2. Works like a charm.

@Klerith
Klerith / maps-vs-sets.md
Created December 23, 2024 16:10
JavaScript Maps vs Sets

Mapas vs Sets de JavaScript

Característica Map Set
Almacena Pares clave-valor Valores únicos
Claves permitidas Cualquier tipo de dato No aplica
Valores duplicados Permitidos (por clave única) No permitidos

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@pythoninthegrass
pythoninthegrass / game.sh
Last active May 9, 2026 22:06
sunshine, gamescope + steam
#!/usr/bin/env bash
# TODO: test wayland gamescope session
export DISPLAY=:0 # vnc
export WAYLAND_DISPLAY=:2 # xwayland
export DXVK_HDR=1
export ENABLE_GAMESCOPE_WSI=1
# Check existing X server
start_x() {
@qnblackcat
qnblackcat / README.md
Last active May 9, 2026 22:05
Downloading older versions of iOS apps using ipatool

Downloading older versions of iOS apps using ipatool

👉 ipatool is an open-source tool developed by Majd, a highly trustworthy and talented developer in the iOS community. Recently, ipatool got a significant update that allows users to easily download older versions of iOS apps on macOS/Windows/Linux!.

👉 Since ipatool doesn't have a graphical user interface (GUI), some of you might think it's tricky to use. But trust me, it's not! Here's a simple guide if you're still a bit scared of the terminal. (Tbh, everything in this *guide can be found on ipatool's repo)

👉 Note: You need to log into your Apple ID via ipatool for the tool to work. Unless you prioritize security above all, you can trust logging into your Apple account with ipatool. As explained earlier, it’s an open-source tool developed by a well-known and reliable developer, minimizing security risks to the lowest level.

@tdcosta100
tdcosta100 / WSL2GUIWSLg-Wayland-en.md
Last active May 9, 2026 22:04
Using full desktop shell in WSL2 using WSLg (Wayland)

Full desktop shell in WSL2 using WSLg (Wayland)

Note

If you want a more complete experience and already tried the Xvnc tutorial, maybe you should try the WSLg (Xwayland) instead.

Warning

This is a work in progress tutorial. Things done here may break existing functionality, so be careful!

In this tutorial, we will install and use a full GNOME Desktop environment in WSL2, without any external software. The only requirement is a working WSLg installation. At the moment, the instructions are only for Ubuntu (20.04, 22.04 and 24.04) distros and GNOME, but you can request me to test other distros and desktop environments.

@tdcosta100
tdcosta100 / WSL2GUIWSLg-XWayland-en.md
Last active May 9, 2026 22:04
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@fnky
fnky / ANSI.md
Last active May 9, 2026 22:02
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27